import { NextRequest } from 'next/server'
import { SheetController } from '@/lib/controllers/sheet.controller'

const sheetController = new SheetController()

// 获取表格详情
export async function GET(
  request: NextRequest,
  { params }: { params: { id: string } }
) {
  return await sheetController.getSheetById(request, { params })
}

// 更新表格信息
export async function PUT(
  request: NextRequest,
  { params }: { params: { id: string } }
) {
  return await sheetController.updateSheet(request, { params })
}

// 删除表格
export async function DELETE(
  request: NextRequest,
  { params }: { params: { id: string } }
) {
  return await sheetController.deleteSheet(request, { params })
}